"""
Project Name : api_automation_framework
File Name : gzip_demo.py
Author : lldhsds
Date : 2024/12/28 10:56
Description: /gzip, 返回一个 Gzip 压缩格式的响应。Gzip 是一种常见的压缩算法，广泛用于 Web 数据的压缩。
"""

import requests


# GET: /gzip
# Returns GZip-encoded data.
# parameters: None
# response: 200(GZip-encoded data.)

def gzip_demo():
    headers = {'content-type': 'application/json'}
    response = requests.get('https://httpbin.org/gzip', headers=headers)
    print(response.status_code)
    print(response.text)
    print(response.headers)

gzip_demo()
